home *** CD-ROM | disk | FTP | other *** search
/ Chip 1996 November / Chip 11-96.iso / treiber / drucker / lexmark / optrae / windows / optraewi.exe / LINNET.ZIP / NET.LIN
INI File  |  1995-08-17  |  16KB  |  534 lines

  1. [Variables]
  2. ;
  3. ; >>>
  4. ; >>> BEGINNING OF NLS -- Start translating here.
  5. ; >>>
  6. ; >>> Do not translate the variable name on the left, only translate the
  7. ; >>> quoted string.
  8. ; >>>
  9. ;
  10. $APPNAME = "Lexmark MarkNet Network Adapter Installation"
  11. $FINALMSG = "Your network adapter software has been successfully installed!"
  12.  
  13. $Str_CompName_Network = "Network Support"
  14. $Str_CompName_Netware = "Netware"
  15. $Str_CompName_LanMan = "LAN Server, LAN Manager, Windows NT Server"
  16. $Str_CompName_LInstall = "Lexmark Install for Windows"
  17. $Str_CompName_Other = "Unlisted Network"
  18.  
  19. $Str_Disk_Netware = "MarkNet Network Adapter for Novell Netware"
  20. $Str_Disk_LanMan = "MarkVision Network Client"
  21. $Str_Disk_Other = "Unlisted Network"
  22.  
  23. $Str_Prompt_ChooseNetDir = "We recommend installing network files into their own directory.  Please enter a path in the field to the right.\n\nThen select the <OK> button to continue installation."
  24.  
  25. $Str_Prompt_ChooseServerNet = "If you wish to install network support for MarkVision in the server directory, please select the supported networks below and press <OK> to continue."
  26. $Str_Prompt_NetTitle = "Create Program Manager Item"
  27. $Str_Prompt_NetMsg = "To create a new Program Manager item for the Network Printer Utility, choose a group name and item name below and press the <OK> button."
  28. $Str_NetworkPrinterUtility = "Network Printer Utility"
  29.  
  30.  
  31. ; >>>
  32. ; >>> END OF NLS -- Stop translating here
  33. ; >>>
  34.  
  35.  
  36. ;
  37. ; System variables...
  38. ;
  39. $INSTALLMETHODS = "E"
  40. $INSTALLMACRO = "InstallNetwork"
  41. $SIZECOMPONENT = ""
  42.  
  43.  
  44. ;
  45. ; Switches that toggle installation of the different components.
  46. ; Network administrators may override these in an extra config file
  47. ; to tailor for their own environment.
  48. ;
  49. $Install_Network = $NO
  50. $Install_Netware = $NETWORKNETWARE
  51. $Install_LanMan = $NETWORKLANMAN
  52. $Install_Other = $NO
  53. $Install_Server_Novell = $NO
  54. $Install_Server_LanMan = $NO
  55. $Install_Server_Other = $NO
  56.  
  57. ;
  58. ; Other globals
  59. ;
  60. $Language = ""
  61. $NetUsingOldDir = $NO
  62. $OtherNetRspFile = "instnet.rsp"            ; Install full network support
  63. $OtherNetRMVRspFile = "rmvnet.rsp"        ; Install minimal DLLs for remote MarkVision installation
  64. $Net_Install_RemoteMV = $NO                ; Are we NOW installing remote MV stuff?
  65.  
  66. ;
  67. ; Variables from other files
  68. ;
  69. $Install_RemoteMV = $Install_RemoteMV                    ; optra.lin
  70. $RemoteMarkVisionDir = $RemoteMarkVisionDir            ; mv.lin
  71. $LexpanelINI = $LexpanelINI                                ; mv.lin
  72.  
  73. ;
  74. ; Location of net files
  75. ;
  76. $NetDir = ""
  77.  
  78. ;
  79. ; INI file entries
  80. ;
  81. $Str_INI_NetSection = "Interwin"
  82. $Str_INI_NetCmdLine = "CmdLine"
  83.  
  84. ;
  85. ; Temp strings
  86. ;
  87. $TempString = ""
  88. $Net_TempAppDir = ""
  89. $Net_TempSystemDir = ""
  90.  
  91.  
  92. [Libraries]
  93. NetUtil = linutil.dll
  94.  
  95. [Disks]
  96. NetwareDisk = $Str_Disk_Netware, netware.bmp, 0, 0, 255
  97. LanManDisk = $Str_Disk_LanMan, netms.bmp, 0, 0, 255
  98. OtherDisk = $Str_Disk_Other, , 0, 0, 255
  99.  
  100.  
  101. [Banners]
  102.  
  103.  
  104. [Components]
  105. ; Empty placeholder components for the custom list
  106. Network = $Str_CompName_Network, , , , , NUL
  107. Netware = $Str_CompName_Netware, , , , , (NetwareDLLsSys, NetwareZipFile)
  108. LanMan = $Str_CompName_LanMan, , , , , (LanManZipFile, LanManMVDLL)
  109.  
  110. Other = $Str_CompName_Other, , $TEMPDIR, OtherDisk, 1, instothr.zip
  111.  
  112. ; Normal components
  113. NetwareDLLsSys = "", , $SYSTEMDIR, NetwareDisk, 960, dll.zip
  114. NetwareDLLsTemp = "", , $TEMPDIR, NetwareDisk, 960, dll.zip
  115.  
  116. NetwareZipFile = "", , $TEMPDIR, NetwareDisk, 2074, interwin.zip
  117. NetwareExe = "", , $NetDir, , 488, (!interwin.exe)
  118. NetwareMinimal = "", , $SYSTEMDIR, , 224, (!lexnwnet.dll, !bwcc.dll)
  119. Override_Netware = "", , $TEMPDIR, NetwareDisk, 1, instnovl.zip
  120.  
  121. LanManZipFile = "", , $TEMPDIR, LanManDisk, 1423, interact.zip
  122. LanManMVDLL = "", , $SYSTEMDIR, ,81, (!lexllnet.dll)
  123. LanManExe = "", , $NetDir, , 175, (!interact.exe)
  124. Override_LanMan = "", , $TEMPDIR, LanManDisk, 1, instls.zip
  125.  
  126. ; Server components
  127. Server_Novell = "", , $SERVERAPPDIR, NetwareDisk, 1214, (dll.zip, interwin.zip)
  128. Server_LanMan = "", , $SERVERAPPDIR, LanManDisk, 654, interact.zip
  129. Server_Other = "", , $SERVERAPPDIR, OtherDisk, 1, instothr.zip
  130.  
  131. Server_Net = "", , $SERVERAPPDIR, PrtSetup, 36,
  132.     (=net.lin, =netware.bmp, =netms.bmp, =shelldde.dll)
  133.  
  134.  
  135.  
  136.  
  137. [Macros]
  138.  
  139. ; InstallNetwork:    Installs the network DLL.
  140. ;
  141. InstallNetwork()
  142.     (
  143.     IfEqual($INSTALLMODE, "S",
  144.         CallMacro(InstallNetworkServer, , ),
  145.         CallMacro(InstallNetworkNormal, , ))
  146.     )
  147.  
  148.  
  149.  
  150. ; InstallNetworkNormal:  Non-server network installation.
  151. ;
  152. InstallNetworkNormal()
  153.     (
  154.     IfEqual($Install_Other, $NO, CallMacro(MakeNetworkPath, , ))
  155.  
  156.     ; Install the stuff specific to the network supported
  157.     IfEqual($Install_Netware, $YES, CallMacro(InstallNetware, , ))
  158.     IfEqual($Install_Netware, "X", CallMacro(InstallNetware, , ))
  159.     IfEqual($Install_LanMan, $YES, CallMacro(InstallLanMan, , ))
  160.     IfEqual($Install_Other, $YES, CallMacro(InstallOther, , ))
  161.     )
  162.  
  163.  
  164.  
  165. ; InstallNetworkServer:    Asks the user whether they want to install the
  166. ;                                network files in their server installation, and
  167. ;                                then installs them.
  168. ;
  169. InstallNetworkServer()
  170.     (
  171.     ; Maybe we are going to install remote MV support, but not right now...
  172.     SetVariable($Net_Install_RemoteMV, $NO)
  173.  
  174.     ChooseMultiple( , $Str_Prompt_ChooseServerNet,
  175.         ($Str_CompName_Netware, $Str_CompName_LanMan, $Str_CompName_Other),
  176.         ($Install_Server_Novell, $Install_Server_LanMan,
  177.       $Install_Server_Other), , $HelpID_ChooseNetsForServer)
  178.  
  179.     ; Update the progress meter to include these components
  180.     IfEqual($Install_Server_Novell, $YES, AddProgress(Server_Novell))
  181.     IfEqual($Install_Server_LanMan, $YES, AddProgress(Server_LanMan))
  182.  
  183.     ; Install the mandatory network script file and other stuff
  184. ;    InstallComponent(Server_Net)
  185.  
  186.     ; Copy the selected network stuff to the server directory
  187.     IfEqual($Install_Server_Novell, $YES, CallMacro(InstallNetware, , ))
  188.     IfEqual($Install_Server_LanMan, $YES, CallMacro(InstallLanMan, , ))
  189.     IfEqual($Install_Server_Other, $YES, CallMacro(InstallOther, , ))
  190.  
  191.     ; Install support for MarkVision installation on the network?
  192.     IfEqual($Install_RemoteMV, $YES, CallMacro(NetSupportForRemoteMV, , ))
  193.  
  194.     ; Clear out the install switches now that we have installed them
  195.     SetVariable($Install_Server_Novell, $NO)
  196.     SetVariable($Install_Server_LanMan, $NO)
  197.     SetVariable($Install_Server_Other, $NO)
  198.     )
  199.  
  200.  
  201.  
  202. ; NetSupportForRemoteMV:    Install network support for remote MarkVision.
  203. ;
  204. ;                                    $RemoteMarkVisionDir must already be valid.
  205. ;                                    $LexpanelINI must already be valid.
  206. ;
  207. NetSupportForRemoteMV()
  208.     (
  209.     SetVariable($Net_Install_RemoteMV, $YES)
  210.  
  211.     ; Replace $SYSTEMDIR and $APPDIR to point to the remote directory,
  212.     ; then do a normal install!
  213.  
  214.     ; First, save the value of those vars so we can restore them later
  215.     SetVariable($Net_TempAppDir, $APPDIR)
  216.     SetVariable($Net_TempSystemDir, $SYSTEMDIR)
  217.  
  218.     ; Now override them
  219.     SetVariable($APPDIR, $RemoteMarkVisionDir)
  220.     SetVariable($SYSTEMDIR, $RemoteMarkVisionDir)
  221.  
  222.     ; Where is the lexpanel.ini file?
  223.     MakePathName($NetSupportForRemoteMV, , $RemoteMarkVisionDir, "lexpanel.ini")
  224.  
  225.     ; Now, pick a single network to install
  226.     IfEqual($Install_Server_LanMan, $YES,
  227.         CallMacro(InstallMinimalLanMan, , $NetSupportForRemoteMV),
  228.         IfEqual($Install_Server_Novell, $YES,
  229.             CallMacro(InstallMinimalNetwareDLLs, , $NetSupportForRemoteMV),
  230.          IfEqual($Install_Server_Other, $YES,
  231.                CallMacro(InstallMinimalOther, , ))))
  232.  
  233.     ; Restore the std variables
  234.     SetVariable($APPDIR, $Net_TempAppDir)
  235.     SetVariable($SYSTEMDIR, $Net_TempSystemDir)
  236.  
  237.     ; Now we are done installing remote MV support
  238.     SetVariable($Net_Install_RemoteMV, $NO)
  239.     )
  240.  
  241.  
  242.  
  243. ; MakeNetworkPath:        Make network path
  244. ;
  245. MakeNetworkPath()
  246.     (
  247.     ; Make sure we have a network directory
  248.     CallMacro(FindNetDirectory, , )
  249.     ChoosePath($NetDir, $Str_Prompt_ChooseNetDir, $NetDir,
  250.         $HelpID_ChooseNetworkDir)
  251.     CreatePath($NetDir)
  252.     )
  253.  
  254.  
  255.  
  256. ; InstallMinimalNetwareDLLs:    Installs only bwcc.dll and lexnwnet.dll.
  257. ;                                        Normally, $WinIniFile is $WININI, except
  258. ;                                        when we are installing network files for
  259. ;                                        remote MarkVision, when $WinIniFile is
  260. ;                                        the lexpanel.ini in the remotedir.
  261. ;
  262. InstallMinimalNetwareDLLs($WinIniFile)
  263.     (
  264.     ; Unpack the DLLs into the temp directory
  265.     InstallComponent(NetwareDLLsTemp, , "N")
  266.  
  267.     ; Install bwcc.dll and lexnwnet.dll from the temp dir
  268.     InstallComponent(NetwareMinimal, , "N")
  269.  
  270.     ; Tell MarkVision which DLL to load
  271.     SetINI($WinIniFile, "MarkVision", "NetDLL", "lexnwnet.dll")
  272.     )
  273.  
  274.  
  275.  
  276. ; InstallNetware: Installs the Netware support software.
  277. ;
  278. InstallNetware()
  279.     (
  280.     ForceDisk(NetwareDisk, "interwin.zip")
  281.     MakePathname($InstallNetware, , $DISKDIR, instnovl.zip)
  282.     FileExists($InstallNetware, $TempString)
  283.     IfEqual($TempString, $YES,
  284.              CallMacro(OverrideNetware, , ),
  285.              IfEqual($INSTALLMODE, "S",
  286.                  InstallComponent(Server_Novell),
  287.                  CallMacro(InstallNetwareReal, , )))
  288.     )
  289.  
  290.  
  291.  
  292. OverrideNetware()
  293.     (
  294.     InstallComponent(Override_Netware, , "N")
  295.     CallMacro(RunInstNet, , )
  296.     )
  297.  
  298.  
  299.  
  300. InstallNetwareReal()
  301.     (
  302.     ; First, install the files inside dll.zip
  303.     IfEqual($NETWORKNETWARE, "X",
  304.         InstallComponent(NetwareDLLsSys),
  305.         CallMacro(InstallMinimalNetwareDLLs, , $WININI))
  306.  
  307.     ; Next, unpack interwin.zip into the temp directory
  308.     InstallComponent(NetwareZipFile)
  309.  
  310.     ; Which language are they using?
  311.     GetINI($WinINI, "intl", "sLanguage", $TempString)
  312.     SetVariable($Language, "")
  313.     IfEqual($TempString, "deu", SetVariable($Language, "german"))
  314.     IfEqual($TempString, "esn", SetVariable($Language, "spanish"))
  315.     IfEqual($TempString, "esp", SetVariable($Language, "spanish"))
  316.     IfEqual($TempString, "fra", SetVariable($Language, "french"))
  317.     IfEqual($TempString, "frc", SetVariable($Language, "french"))
  318.     IfEqual($TempString, "ita", SetVariable($Language, "italian"))
  319.     IfEqual($Language, "", SetVariable($Language, "english"))
  320.  
  321.     ; {language}.dll --> interdll.dll
  322.     SetVariable($InstallNetwareReal, ($Language, ".dll"))
  323.     MakePathName($InstallNetwareReal, , $TEMPDIR, $InstallNetwareReal)
  324.     MakePathName($TempString, , $NetDir, "interdll.dll")
  325.     CopyFile($InstallNetwareReal, $TempString)
  326.  
  327.     ; {language}.hlp --> interwin.hlp
  328.     SetVariable($InstallNetwareReal, ($Language, ".hlp"))
  329.     MakePathName($InstallNetwareReal, , $TEMPDIR, $InstallNetwareReal)
  330.     MakePathName($TempString, , $NetDir, "interwin.hlp")
  331.     CopyFile($InstallNetwareReal, $TempString)
  332.  
  333.     ; Copy interwin.exe and set up the win.ini pointer
  334.     InstallComponent(NetwareExe)
  335.     MakePathName($InstallNetwareReal, , $NetDir, "interwin.exe")
  336.     SetVariable($InstallNetwareReal, ($InstallNetwareReal, " /h"))
  337.     SetINI($WININI, $Str_INI_NetSection, $Str_INI_NetCmdLine, $InstallNetwareReal)
  338.  
  339.  
  340.     CallLibrary(NetUtil, CreateProgmanItem, $Str_NetworkPrinterUtility,
  341.         ($Str_DefaultMarkVisionGroup, $Str_NetworkPrinterUtility,
  342.         $InstallNetwareReal, $NO, $Str_Prompt_NetTitle,
  343.                 $Str_Prompt_NetMsg, $HelpID_MVCreateItem))
  344.     )
  345.  
  346.  
  347.  
  348. ; InstallLanMan: Installs the LanMan support software.
  349. ;
  350. InstallLanMan()
  351.     (
  352.     ForceDisk(LanManDisk, "interact.zip")
  353.     MakePathname($InstallLanMan, , $DISKDIR, instls.zip)
  354.     FileExists($InstallLanMan, $TempString)
  355.     IfEqual($TempString, $YES,
  356.              CallMacro(OverrideLanMan, , ),
  357.              IfEqual($INSTALLMODE, "S",
  358.                  InstallComponent(Server_LanMan),
  359.                  CallMacro(InstallLanManReal, , )))
  360.     )
  361.  
  362.  
  363.  
  364. OverrideLanMan()
  365.     (
  366.     InstallComponent(Override_LanMan, , "N")
  367.     CallMacro(RunInstNet, , )
  368.     )
  369.  
  370.  
  371.  
  372. ; InstallMinimalLanMan:    This macro installs only the MarkVision DLL
  373. ;                                for LanMan support.
  374. ;                                Normally, $WinIniFile is $WININI, except
  375. ;                                when we are installing network files for
  376. ;                                remote MarkVision, when $WinIniFile is
  377. ;                                the lexpanel.ini in the remotedir.
  378. ;
  379. InstallMinimalLanMan($WinIniFile)
  380.     (
  381.     ; First, unpack interact.zip into the temp directory
  382.     InstallComponent(LanManZipFile, , "N")
  383.  
  384.     ; Now copy the lexllnet.dll to the system directory
  385.     InstallComponent(LanManMVDLL, , "N")
  386.  
  387.     ; Tell MarkVision which DLL to load
  388.     SetINI($WinIniFile, "MarkVision", "NetDLL", "lexllnet.dll")
  389.     )
  390.  
  391.  
  392.  
  393. ; InstallLanManReal: Installs the Interact (non-Novell) software.
  394. ;
  395. InstallLanManReal()
  396.     (
  397.     CallMacro(InstallMinimalLanMan, , $WININI)
  398.  
  399.     ; Which language are they using?
  400.     GetINI($WinINI, "intl", "sLanguage", $TempString)
  401.     SetVariable($Language, "")
  402.     IfEqual($TempString, "deu", SetVariable($Language, "ger"))
  403.     IfEqual($TempString, "esn", SetVariable($Language, "spa"))
  404.     IfEqual($TempString, "esp", SetVariable($Language, "spa"))
  405.     IfEqual($TempString, "fra", SetVariable($Language, "fre"))
  406.     IfEqual($TempString, "frc", SetVariable($Language, "fre"))
  407.     IfEqual($TempString, "ita", SetVariable($Language, "ita"))
  408.     IfEqual($Language, "", SetVariable($Language, "eng"))
  409.  
  410.     ; act_{language}.dll --> interlan.dll
  411.     SetVariable($InstallLanManReal, ("act_", $Language, ".dll"))
  412.     MakePathName($InstallLanManReal, , $TEMPDIR, $InstallLanManReal)
  413.     MakePathName($TempString, , $NetDir, "interlan.dll")
  414.     CopyFile($InstallLanManReal, $TempString)
  415.  
  416.     ; act_{language}.hlp --> interact.hlp
  417.     SetVariable($InstallLanManReal, ("act_", $Language, ".hlp"))
  418.     MakePathName($InstallLanManReal, , $TEMPDIR, $InstallLanManReal)
  419.     MakePathName($TempString, , $NetDir, "interact.hlp")
  420.     CopyFile($InstallLanManReal, $TempString)
  421.  
  422.     ; Copy interact.exe and set up the win.ini pointer
  423.     InstallComponent(LanManExe)
  424.     MakePathName($InstallLanManReal, , $NetDir, "interact.exe")
  425.     SetVariable($InstallLanManReal, ($InstallLanManReal, " /h"))
  426.     SetINI($WININI, $Str_INI_NetSection, $Str_INI_NetCmdLine, $InstallLanManReal)
  427.  
  428.     CallLibrary(NetUtil, CreateProgmanItem, $Str_NetworkPrinterUtility,
  429.         ($Str_DefaultMarkVisionGroup, $Str_NetworkPrinterUtility,
  430.         $InstallLanManReal, $NO, $Str_Prompt_NetTitle,
  431.                 $Str_Prompt_NetMsg, $HelpID_MVCreateItem))
  432.     )
  433.  
  434.  
  435.  
  436. ; FindNetDirectory:    Find the existing network directory, or create a default
  437. ;                            when one is not found.
  438. ;
  439. FindNetDirectory()
  440.     (
  441.     ; Where are the network files currently stored?
  442.     GetINI($WININI, "Interwin", "CmdLine", $FindNetDirectory)
  443.    SplitPath($APPDIR, $TempString, , )
  444.     IfEqual($FindNetDirectory, "",
  445.         MakePathName($NetDir, $TempString, "\\netprint", ),
  446.         CallMacro(UseOldNetDirectory, $NetDir, $FindNetDirectory))
  447.     )
  448.  
  449.  
  450.  
  451. ; UpdateNetDirectory:   This is called after the user changes the location
  452. ;                       of $APPDIR
  453. ;
  454. UpdateNetDirectory()
  455.     (
  456.     IfEqual($NetUsingOldDir, $NO, CallMacro(FindNetDirectory, , ))
  457.     )
  458.  
  459.  
  460.  
  461. ; UseOldNetDirectory:    Given a string that represents the commandline for
  462. ;                                the existing network exe (for example,
  463. ;                                "c:\netprint\interwin.exe /h"), this macro returns
  464. ;                                the name of the directory (in this example,
  465. ;                                "c:\netprint".)
  466. ;
  467. UseOldNetDirectory($cmdline)
  468.     (
  469.     ; First remove the /h
  470.     RemoveToken($cmdline, " ", "/h")
  471.  
  472.     ; Now remove the filename
  473.     CallMacro(StripFilename, $UseOldNetDirectory, $cmdline)
  474.  
  475.     SetVariable($NetUsingOldDir, $YES)
  476.     )
  477.  
  478.  
  479.  
  480. ; Initialize:    Called when the file is first read.
  481. ;
  482. Initialize()
  483.     (
  484.     ; If $Install_Netware is "X" (NetX detected), change it to $YES
  485.     IfEqual($Install_Netware, "X", SetVariable($Install_Netware, $YES))
  486.  
  487.     ; Prevent both networks from being active at once.  When both are
  488.     ; available, we choose Novell by default...
  489.     IfEqual($Install_Netware, $Install_LanMan,
  490.         IfEqual($Install_LanMan, $YES, SetVariable($Install_LanMan, $NO)))
  491.  
  492.     ; Find the current home for the network directory
  493.     CallMacro(FindNetDirectory, , )
  494.     )
  495.  
  496.  
  497. ;  InstallOther:        Installs 'other' network component.
  498. ;
  499. InstallOther()
  500.     (
  501.     InstallComponent(Other, , "N")
  502.     CallMacro(RunInstNet, , )
  503.     )
  504.  
  505.  
  506.  
  507. ; InstallMinimalOther:    Installs only MarkVision support for the
  508. ;                                unlisted network.
  509. ;
  510. InstallMinimalOther()
  511.     (
  512.     CallMacro(InstallOther, , )
  513.     )
  514.  
  515.  
  516.  
  517. ; RunInstNet(): Runs "linstall.exe -v2 @responsefile" in tempdir
  518. ;
  519. RunInstNet()
  520.     (
  521.     ; Are we doing server install to remote runnable MarkVision directory?
  522.     ; If so, we look for a different rsp file, so they know to run a different
  523.     ; macro or something...
  524.     IfEqual($Net_Install_RemoteMV, $YES,
  525.         MakePathname($RunInstNet, , $TEMPDIR, $OtherNetRMVRspFile),
  526.         MakePathname($RunInstNet, , $TEMPDIR, $OtherNetRspFile))
  527.  
  528.     ; Prepend the -v2 parameter to start the install immediately
  529.     SetVariable($RunInstNet, ("-v2 @", $RunInstNet))
  530.  
  531.     ; Now begin!
  532.     CallInstall($RunInstNet)
  533.     )
  534.